const utils = require('loader-utils')
const validate = require('schema-utils')
const schema = {
  test: 'string'
}

module.exports = function (source) {
  console.log('source:', source)
  let options = utils.getOptions(this)
  console.log('options:', options)
  // 验证配置
  validate(schema, options, 'test')

  return `export default ${JSON.stringify(source)}`
}
